package com.kehong.station.entity;

import java.sql.Timestamp;

/**
 * @author zhang peng yang ming
 * @CopyRight (C) http://www.csdn.com
 * @brief 车票的实体类
 * @email 122162005@qq.com
 * @date 2018-07-10
 */
public class Ticket {
    /**
     * 车票 ID
     */
    private Long id;

    /**
     * 发车时间
     */
    private Timestamp startTime;

    /**
     * 起始车站
     */
    private String startStation;

    /**
     * 终点站
     */
    private String endStation;

    /**
     * 班车类型
     */
    private Integer type;

    /**
     * 车票价格：单位（分）
     */
    private Integer price;

    /**
     * 车票的余票数量
     */
    private Integer amount;

    public Ticket() {
    }

    public Ticket(Long id, Timestamp startTime, String startStation, String endStation, Integer type, Integer price, Integer amount) {
        this.id = id;
        this.startTime = startTime;
        this.startStation = startStation;
        this.endStation = endStation;
        this.type = type;
        this.price = price;
        this.amount = amount;
    }

    public Ticket(Timestamp startTime, String startStation, String endStation, Integer type, Integer price, Integer amount) {
        this.startTime = startTime;
        this.startStation = startStation;
        this.endStation = endStation;
        this.type = type;
        this.price = price;
        this.amount = amount;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Timestamp getStartTime() {
        return startTime;
    }

    public void setStartTime(Timestamp startTime) {
        this.startTime = startTime;
    }

    public String getStartStation() {
        return startStation;
    }

    public void setStartStation(String startStation) {
        this.startStation = startStation;
    }

    public String getEndStation() {
        return endStation;
    }

    public void setEndStation(String endStation) {
        this.endStation = endStation;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    @Override
    public String toString() {
        return "Ticket{" +
                "id=" + id +
                ", startTime=" + startTime +
                ", startStation='" + startStation + '\'' +
                ", endStation='" + endStation + '\'' +
                ", type=" + type +
                ", price=" + price +
                ", amount=" + amount +
                '}';
    }
}
